<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:p="http://primefaces.org/ui"
             xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:form id="frmExcecao">
        <p:remoteCommand id="cmdShowException"
                         name="showException"
                         update="txtErroDescricao, 
                         txtErroId, 
                         txtErroMsgOriginal"
                         oncomplete="$('#modal-exception').modal('show'); return false;"/>

        <div id="modal-exception" class="modal hide fade">
            <div class="modal-header">
                <h:panelGrid columns="2" cellpadding="5">
                    <p:graphicImage value="/resources/img/error.png" />
                    <h3 id="modal-title">Ops, não conseguimos fazer isso!</h3>
                </h:panelGrid>
            </div>
            <div class="modal-body">
                <p class="center" id="modal-content">
                    <h:panelGrid columns="2" 
                                 cellpadding="5"
                                 cellspacing="5">
                        <h:outputLabel value="Falha: "
                                       style="font-weight: bold; text-align: right;"/>
                        <h:outputLabel id="txtErroId"/>
                        <h:outputLabel value="Descrição: "
                                       style="font-weight: bold; text-align: right;"/>
                        <h:outputLabel id="txtErroDescricao"/>
                        <h:outputLabel value="Mensagem Original: "
                                       style="font-weight: bold; text-align: right;"/>
                        <h:outputLabel id="txtErroMsgOriginal"/>
                    </h:panelGrid>
                </p>
            </div>
            <div class="modal-footer">
                <a href="javascript:void(0);" data-dismiss="modal" class="btn btn-primary" id="modal-button">
                    <span class="add-on"><i class="icon-envelope icon-white"></i></span>
                    Reportar Erro
                </a>
                <a href="javascript:void(0);" data-dismiss="modal" class="btn" id="modal-button">
                    <span class="add-on"><i class="icon-remove"></i></span>
                    Fechar
                </a>
            </div>
        </div>
    </h:form>
</ui:fragment>